#include <map>
#include <string>
#include <iostream>
#include <stdio.h>
using std::map;
using std::string;
using std::cout;
using std::endl;

class RoCCConfig{
    public:
        uint64_t push_rs2 ;
        uint64_t save_rs2 ;
        uint64_t mvm_rs1  ;
        uint64_t mvm_rs2  ;
        uint64_t config   ;
};

class ArrayConfig{
    public:
        uint64_t push_start      ;
        uint64_t push_num        ;
        uint64_t save_start      ;
        uint64_t save_num        ;
        uint64_t mvm_array_index ;
        uint64_t mvm_row_start   ;
        uint64_t mvm_row_num     ;
        uint64_t mvm_col_start   ;
        uint64_t mvm_col_num     ;
        uint64_t conf_random     ;
        uint64_t conf_wisenum    ;
        uint64_t conf_outshift   ;
        uint64_t conf_cimshift   ;
        // RoCCConfig rc;
        RoCCConfig getrc(void);
        // void show_rc(void);
};

RoCCConfig ArrayConfig::getrc(void){
    RoCCConfig rc;
    rc.push_rs2 = push_start <<11    | push_num;
    rc.save_rs2 = save_start <<11    | save_num;
    rc.mvm_rs1  = mvm_row_num <<16   | mvm_col_num;
    rc.mvm_rs2  = mvm_array_index<<22| mvm_row_start <<11|mvm_col_start;
    rc.config   = conf_random <<23   | conf_wisenum <<16 |
                  conf_outshift <<8  | conf_cimshift;
    return rc;
}

// void ArrayConfig::show_rc(void){
    // cout << rc.push_rs2 <<endl;
    // cout << rc.save_rs2 <<endl;
    // cout << rc.mvm_rs1 <<endl;
    // cout << rc.mvm_rs2 <<endl;
    // cout << rc.config <<endl;
//     printf("%lx\n%lx\n%lx\n%lx\n%lx\n",rc.push_rs2,rc.save_rs2,rc.mvm_rs1,rc.mvm_rs2,rc.config);
// }


//ac2.init();

// int main(){
//     ac1.push_start     = 0; 
//     ac1.push_num       = 488; 
//     ac1.save_start     = 0; 
//     ac1.save_num       = 96; 
//     ac1.mvm_array_index= 0; 
//     ac1.mvm_row_start  = 0; 
//     ac1.mvm_row_num    = 484; 
//     ac1.mvm_col_start  = 0; 
//     ac1.mvm_col_num    = 92; 
//     ac1.conf_random    = 0; 
//     ac1.conf_wisenum   = 1; 
//     ac1.conf_outshift  = 1; 
//     ac1.conf_cimshift  = 0; 
//     //ac1.init();
    
//     ac2.push_start     =  0;
//     ac2.push_num       =  96;
//     ac2.save_start     =  96;
//     ac2.save_num       =  16;
//     ac2.mvm_array_index=  0;
//     ac2.mvm_row_start  =  0;
//     ac2.mvm_row_num    =  92;
//     ac2.mvm_col_start  =  96;
//     ac2.mvm_col_num    =  10;
//     ac2.conf_random    =  0;
//     ac2.conf_wisenum   =  64;
//     ac2.conf_outshift  =  4;
//     ac2.conf_cimshift  =  0;
//     myMap["fc1"].init();
//     myMap["fc2"].init();

//     map<string, ArrayConfig> myMap = {
//         {"fc1",  ac1},
//         {"fc2",  ac2}
//     };

//     return 0;
// }